<?php session_start();
include_once 'data/usercheck.php';
?>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
	<title>Food Online</title>
	<link rel="stylesheet" href="style.css" type="text/css" charset="utf-8" />
    <style type="text/css">
<!--
.style1 {color: #FFFFFF}
-->
    </style>
    <script type="text/javascript">
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
    </script>
</head>
<!body onload="MM_preloadImages('images/header.jpg')">
<body img src="C:\xampp\htdocs\stms\pages\images\header1.jpg" height="500" width="300">
<div id="wrapper">
<div id="logo">
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <table width="200" border="0" align="center">
    <tr>
      <td height="30"><FONT size="+6">
        <div align="center">STMS</div></td>
    </tr>
    <tr>
      <td><div align="center">STUDENT MANAGEMENT SYSTEM</div></td>
    </tr>
</table>
 
</div>
    <div id="nav">
      <div id="nav-left">
        <ul>
          <li><a href="view1.php">Home</a></li>
          <li class="orange">
            <div align="left"><a href="http://localhost/stms/pages/data/logout.php">Logout-<?php include_once 'data/databaseconnection.php';session_start();echo $_SESSION['username'];?></a></div>
          </li>
        </ul>
      </div>
      <div id="nav-right">
        <ul>
         
           <li><a href="Aboutus.php">About us</a></li>
          <li><a href="viewhome.php">Student</a></li>
          <li><a href="Adminhome.php">Admin</a></li>
          <li><a href="http://www.freewebsitetemplates.com">Contact</a></li>
        </ul>
      </div>
      <div align="right"></div>
    </div>
    <div id="body">
<div align="left">
  <table width="745" border="0">
    <tr>
      <td width="45"><font size="+1"><a href="view1.php">Show</a></font></td>
      <td width="100"><div align="left"><font size="+1"><a href="compview.php">Combination</a></font></div></td>
      <td width="60"><div align="left"><font size="+1"><a href="resultview.php">Results</a></font></div></td>
      <td width="134">&nbsp;</td>
      <td width="384"><div align="right"><font size="+1"><a href="changepass.php">changepassword</a></font></div></td>
      </tr>
  </table>
  <div align="right"></div>
</div>
<p>&nbsp;</p>
<table width="587" border="0">
  <tr>
    <td width="103"><font size="+1">BasicDetails</font></td>
    <td width="217">&nbsp;</td>
    <td width="253"><font size="+1">G.C.E A/L</font></td>
  </tr>
  <tr>
    <td><?php
		  
		  require_once 'data/databaseconnection.php';
		  
		   
		   $pass1=$_SESSION['password'];
		   $pass=md5($pass1);
		   $user=$_SESSION['username'];
		   //$a=mysql_query("SELECT*FROM user WHERE password='$pass' AND username='$user'");
		
			//$a=mysql_query("SELECT Regno FROM user WHERE password='$pass' AND username='$user' LEFT JOIN SELECT Regno FROM basicdetails ");
		//$a=mysql_query("SELECT *FROM basicdetails WHERE Regno in (SELECT Regno FROM user WHERE Password='$pass')");
		// echo mysql_num_rows($a);
		$a=mysql_query("SELECT *FROM basicdetails WHERE Regno in (SELECT Regno FROM user WHERE Password='$pass')");
		
    if (!$a) {
        die('Invalid query: ' . mysql_error());
    }
		 
		 // $b=mysql_query("SELECT * FROM basicdetails WHERE Regno='$reg'");
			//while($row2=mysql_fetch_array($b)&&$row1=mysql_fetch_array($a))
			
			
				//if($row1['Regno']==$row2['Regno'])
				//if($a['Regno']==$b['Regno'])
				if (mysql_num_rows($a) == 1)
				{
				
			echo "<table border=0>";
			
			
			
			
			
			
			
			
			
			
			
			
			
			//$result=mysql_query($a);
			while($row=mysql_fetch_array($a))
			{
			echo "<tr>";
			echo "<td>Regno</td>";
			 echo "<td>&nbsp;&nbsp;</td>";
				echo "<td>".$row['Regno'];
				echo "<td>&nbsp;&nbsp;</td>";
              echo "<td>&nbsp;&nbsp;</td>";
			  echo "<td>&nbsp;&nbsp;</td>";
              echo "<td>&nbsp;&nbsp;</td>";
			  echo "<td>&nbsp;&nbsp;</td>";
              echo "<td>&nbsp;&nbsp;</td>";
			  echo "<td>&nbsp;&nbsp;</td>";
              echo "<td>&nbsp;&nbsp;</td>";
			  echo "<td>&nbsp;&nbsp;</td>";
              echo "<td>&nbsp;&nbsp;</td>";
				echo "<td>Permanentaddress</td>";
				echo "<td>&nbsp;&nbsp;</td>";
				echo "<td>".$row['Permanentaddress'];
				
				echo "<tr><td >Title</td>";
				echo "<td>&nbsp;&nbsp;</td>";
				echo "<td>".$row['Title'];
				echo "<td>&nbsp;&nbsp;</td>";
              echo "<td>&nbsp;&nbsp;</td>";
			  echo "<td>&nbsp;&nbsp;</td>";
              echo "<td>&nbsp;&nbsp;</td>";
			  echo "<td>&nbsp;&nbsp;</td>";
              echo "<td>&nbsp;&nbsp;</td>";
			  echo "<td>&nbsp;&nbsp;</td>";
              echo "<td>&nbsp;&nbsp;</td>";
			  echo "<td>&nbsp;&nbsp;</td>";
              echo "<td>&nbsp;&nbsp;</td>";
				echo "<td>Temporaryaddress </td>";
				echo "<td>&nbsp;&nbsp;</td>";
				echo "<td>".$row['Temporaryaddress'];
				
				echo "<tr><td>Firstname</td>";
				echo "<td>&nbsp;&nbsp;</td>";
				echo "<td>".$row['Firstname'];
				echo "<td>&nbsp;&nbsp;</td>";
              echo "<td>&nbsp;&nbsp;</td>";
			  echo "<td>&nbsp;&nbsp;</td>";
              echo "<td>&nbsp;&nbsp;</td>";
			  echo "<td>&nbsp;&nbsp;</td>";
              echo "<td>&nbsp;&nbsp;</td>";
			  echo "<td>&nbsp;&nbsp;</td>";
              echo "<td>&nbsp;&nbsp;</td>";
			  echo "<td>&nbsp;&nbsp;</td>";
              echo "<td>&nbsp;&nbsp;</td>";
				echo "<td>Faculty</td>";
				echo "<td>&nbsp;&nbsp;</td>";
				echo "<td>".$row['Faculty'];
				
				echo "<tr><td>Lastname</td>";
				echo "<td>&nbsp;&nbsp;</td>";
				echo "<td>".$row['Lastname'];
				echo "<td>&nbsp;&nbsp;</td>";
              echo "<td>&nbsp;&nbsp;</td>";
			  echo "<td>&nbsp;&nbsp;</td>";
              echo "<td>&nbsp;&nbsp;</td>";
			  echo "<td>&nbsp;&nbsp;</td>";
              echo "<td>&nbsp;&nbsp;</td>";
			  echo "<td>&nbsp;&nbsp;</td>";
              echo "<td>&nbsp;&nbsp;</td>";
			  echo "<td>&nbsp;&nbsp;</td>";
              echo "<td>&nbsp;&nbsp;</td>";
				echo "<td>CourseOfStudy </td>";
				echo "<td>&nbsp;&nbsp;</td>";
				echo "<td>".$row['CourseOfStudy'];
				
				
				echo "<tr><td>NICno</td>";
				echo "<td>&nbsp;&nbsp;</td>";
				echo "<td>".$row['NICno'];
				echo "<td>&nbsp;&nbsp;</td>";
              echo "<td>&nbsp;&nbsp;</td>";
			  echo "<td>&nbsp;&nbsp;</td>";
              echo "<td>&nbsp;&nbsp;</td>";
			  echo "<td>&nbsp;&nbsp;</td>";
              echo "<td>&nbsp;&nbsp;</td>";
			  echo "<td>&nbsp;&nbsp;</td>";
              echo "<td>&nbsp;&nbsp;</td>";
			  echo "<td>&nbsp;&nbsp;</td>";
              echo "<td>&nbsp;&nbsp;</td>";
				echo "<td>AcademicYear</td>";
				echo "<td>&nbsp;&nbsp;</td>";
				echo "<td>".$row['AcademicYear'];
				
				echo "<tr><td>Gender</td>";
				echo "<td>&nbsp;&nbsp;</td>";
				echo "<td>".$row['Gender'];
				echo "<td>&nbsp;&nbsp;</td>";
              echo "<td>&nbsp;&nbsp;</td>";
			  echo "<td>&nbsp;&nbsp;</td>";
              echo "<td>&nbsp;&nbsp;</td>";
			  echo "<td>&nbsp;&nbsp;</td>";
              echo "<td>&nbsp;&nbsp;</td>";
			  echo "<td>&nbsp;&nbsp;</td>";
              echo "<td>&nbsp;&nbsp;</td>";
			  echo "<td>&nbsp;&nbsp;</td>";
              echo "<td>&nbsp;&nbsp;</td>";
			  echo "<td>District</td>";
			  echo "<td>&nbsp;&nbsp;</td>";
				echo "<td>".$row['District'];
				
				
			echo "<tr><td>Civilstatus</td>";
			echo "<td>&nbsp;&nbsp;</td>";
				echo "<td>".$row['Civilstatus'];
				echo "<td>&nbsp;&nbsp;</td>";
              echo "<td>&nbsp;&nbsp;</td>";
			  echo "<td>&nbsp;&nbsp;</td>";
              echo "<td>&nbsp;&nbsp;</td>";
			  echo "<td>&nbsp;&nbsp;</td>";
              echo "<td>&nbsp;&nbsp;</td>";
			  echo "<td>&nbsp;&nbsp;</td>";
              echo "<td>&nbsp;&nbsp;</td>";
			  echo "<td>&nbsp;&nbsp;</td>";
              echo "<td>&nbsp;&nbsp;</td>";
				echo "<tr><td>DOB</td>";
				echo "<td>&nbsp;&nbsp;</td>";
				echo "<td>".$row['DOB'];
				
				echo "<tr><td>Nationality</td>";
				echo "<td>&nbsp;&nbsp;</td>";
				echo "<td>".$row['Nationality'];
				echo "<td>&nbsp;&nbsp;</td>";
              echo "<td>&nbsp;&nbsp;</td>";
			  echo "<td>&nbsp;&nbsp;</td>";
              echo "<td>&nbsp;&nbsp;</td>";
			  echo "<td>&nbsp;&nbsp;</td>";
              echo "<td>&nbsp;&nbsp;</td>";
			  echo "<td>&nbsp;&nbsp;</td>";
              echo "<td>&nbsp;&nbsp;</td>";
			  echo "<td>&nbsp;&nbsp;</td>";
              echo "<td>&nbsp;&nbsp;</td>";
				echo "<tr><td>Religion</td>"; 
				echo "<td>&nbsp;&nbsp;</td>";
				echo "<td>".$row['Religion']; 
				echo "</tr>";
			}
			echo "</table>";
			
			
			//echo "<tr>";
			
			
			
			
			
			
			//echo "<br>";echo "<br>";echo "<br>";echo "<br>";echo "<br>";
			
			//$result=mysql_query("SELECT * FROM basicdetails");
			
			/*while($row=mysql_fetch_array($a))
			{
				
				
				
				
				
				
				echo "</tr>";
			}
			echo "</table>";*/
			
			}
			
		  ?></td>
    <td>&nbsp;</td>
    <td><?php
		  require_once 'data/databaseconnection.php';
			echo "<table border=0>";
			
			
			
			
			
			
			
			
			
			
			
			
			$result=mysql_query("SELECT * FROM gcealdetails WHERE Regno in (SELECT Regno FROM user WHERE Password='$pass')");
			while($row=mysql_fetch_array($result))
			{
			echo "<tr><td>Regno</td>";
				echo "<td>".$row['Regno'];
				
				echo "<tr><td>Indexno</td>";
				echo "<td>".$row['Indexno'];
				
				echo "<tr><td>Year</td>";
				echo "<td>".$row['Year'];
				
				echo "<tr><td>School</td>";
				echo "<td>".$row['School'];
				
				echo "<tr><td>District </td>";
				echo "<td>".$row['District'];
				
				echo "<tr><td>Stream</td>";
				echo "<td>".$row['Stream'];
				
				
				
				echo "<tr><td>Result </td>";
				echo "<td>".$row['Result'];
				
				echo "<tr><td>Zscore</td>";
				echo "<td>".$row['Zscore'];
				
				echo "<tr><td>DistrictRank</td>";
				echo "<td>".$row['DistrictRank'];
				
				echo "<tr><td>IslandRank</td>";
				echo "<td>".$row['IslandRank'];
				echo "</tr>";
			}
			echo "</table>";
		  ?></td>
  </tr>
</table>
<p>&nbsp;</p>
<p>&nbsp;</p>
      
          <tr>
        <tr>
      </table>
      <!--
		  <table width="750" border="1">
            <tr>
              <th scope="row">&nbsp;</th>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
            </tr>
            <tr>
              <th scope="row">&nbsp;</th>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
            </tr>
            <tr>
              <th scope="row">&nbsp;</th>
              
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
            </tr>
            <tr>
              <th scope="row">&nbsp;</th>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
            </tr>
            <tr>
              <th scope="row">&nbsp;</th>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
            </tr>
          </table>
		  -->
          <p></p>
          <p>&nbsp; </p>
          <p>
            <label for="textfield"></label>
            </form>
  </p>        
  </div>
      <div id="footer">
        <ul>
          <li><a href="view1.php">Home</a> | </li>
          <li><a href="Aboutus.php">About Us</a> | </li>
          <li></li>
          <li><a href="http://studentmanagements.blogspot.com/">Contact</a></li>
        </ul>
        <p>copyright &copy;STMS Group03</p>
      </div>
</div>
</div>
</body>
</html>
